package io.buffered;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;

public class Demo02BufferedOutputStream {
    public static void main(String[] args) throws Exception {
//        File file = new File("F://Test//T1//d.txt");
//        FileOutputStream fos = new FileOutputStream(file);
//        BufferedOutputStream bos = new BufferedOutputStream(fos);
//        BufferedOutputStream bos = new BufferedOutputStream(fos,102400);

        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(new File("F://Test//T1//d.txt")), 102400);

        String s = "宁静致远";
        byte[] bytes = s.getBytes();
        bos.write(bytes);
        bos.flush();
    }
}
